// JavaScript Document
function viewSeminar()
{
	with (window.document.frmListSeminar) {
		if (cboCategory.selectedIndex == 0) {
			window.location.href = 'index.php';
		} else {
			window.location.href = 'index.php?id=' + cboGroup.options[cboGroup.selectedIndex].value;
		}
	}
}

function checkAddSeminarForm()
{
	with (window.document.frmAddSeminar) {
		/*if (cboGroup.selectedIndex == 0) {
			alert('Choose the Seminar Group');
			cboGroup.focus();
			return;
		} else*/ if (isEmpty(txtMaht, 'Nhập mã seminar')) {
			return;
		} else {
			submit();
		}
	}
}

function addSeminar()
{
	window.location.href = 'index.php?view=add';
}

function modifySeminar(id)
{
	window.location.href = 'index.php?view=modify&id=' + id;
}

function deleteSeminar(id)
{
	if (confirm('Xóa seminar này?')) {
		window.location.href = 'processSeminar.php?action=deleteSeminar&id=' + id;
	}
}

function deleteImage(matg)
{
	if (confirm('Delete this image')) {
		window.location.href = 'processSeminar.php?action=deleteImage&matg=' + matg;
	}
}